home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
misc
/
elcheapofax.lha
/
printers
/
density.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-14
|
990b
|
40 lines
/*
* DENSITY.C
*
* David Berezowski - March/88.
* Modified for DICE - May/91 Matthew Dillon
* Modified for ElCheapoFax April 1993 Olaf 'Rhialto' Seibert.
*
* Copyright (c) 1988 Commodore-Amiga, Inc.
* (c)Copyright 1991 Matthew Dillon
* (c)Copyright 1993 Olaf Seibert
*/
#include "defs.h"
Prototype short SetDensity(ULONG);
short
SetDensity(density_code)
ULONG density_code;
{
#define FINE Y_DPI
#define CRUDE Y_DPI/2
#define N LINE_BITS /* maybe will support different LINE_BITS_? values later */
/* SPECIAL_DENSITY 0 1 2 3 4 5 6 7 */
static int YDPI[8] = { CRUDE, CRUDE, CRUDE, CRUDE, FINE, FINE, FINE, FINE };
static char XPIXELS[8] = {N, N, N, N, N, N, N, N };
density_code /= SPECIAL_DENSITY1;
/* default is 80 chars (8.0 in.), W_TRACTOR is 136 chars (13.6 in.) */
PED->ped_MaxXDots = XPIXELS[density_code];
PED->ped_XDotsInch = X_DPI;
PED->ped_YDotsInch = YDPI[density_code];
return 0;
}